/*
 * @Description:
 * @version:
 * @Author: 潘骏杰
 * @Date: 2021-11-22 16:23:06
 * @LastEditors: 潘骏杰
 * @LastEditTime: 2022-01-17 16:20:18
 */

import request from '@/utils/request'
import qs from 'qs'

export function get(data) {
  return request({
    url: '',
    method: 'get',
    params: data
  })
}

export function post(data) {
  return request({
    url: '',
    method: 'post',
    data: qs.stringify(data)
  })
}

// 微信支付接口
export function paymentSubmit(params) {
  return request({
    url: '/api/pay/apply',
    method: 'post',
    data: params
  })
}

// 终端应用向平台提交预约请求
export function Appointment(params) {
  return request({
    url: '/api/appointment',
    method: 'post',
    data: params
  })
}

// 获取医院支持的 PayTypes
export function AppointmentGetHospital(params) {
  return request({
    url: '/api/hospitals/query',
    method: 'post',
    data: params
  })
}

// 询支付结果
export function PayQuery(params) {
  return request({
    url: '/api/pay/query',
    method: 'post',
    data: params
  })
}

// 询支付结果
export function PayQueryById(params) {
  return request({
    url: '/api/appointment/queryById',
    method: 'post',
    data: params
  })
}
